<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="update.aspx.cs" Inherits="GleamTech.FileVista.UpdatePage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>FileVista Update Wizard</title>
		<link href="filevistacontrol/styles/default.css" rel="stylesheet" />
		<script type="text/javascript">
            function showClientMessage(confirmMessage) {
                var fieldClientMessage = document.getElementById("FieldClientMessage");
                
                if (confirmMessage)
                    return confirm(fieldClientMessage.value);
                else
                    alert(fieldClientMessage.value);
            }
		</script>
    </head>
    <body id="BodyTag" runat="server" style="margin: 100px;">
        <form id="form1" runat="server">
            <asp:HiddenField ID="FieldUpdateStep" runat="server" />
            <asp:HiddenField ID="FieldClientMessage" runat="server" />
            <asp:HiddenField ID="FieldFromVersion" runat="server" />
			<table border="0" cellpadding="0" cellspacing="10" class="panel generalText" style="width: 500px;" align="center">
				<tr>
					<td>
                        <asp:Label ID="LabelSetupTitle" runat="server" style=" font-size: 16pt"></asp:Label>
                    </td>
					<td align="center" valign="top"><img width="48" height="48" style="border: none" src="images/setup.png" alt=""/></td>
				</tr>
				<tr>
				    <td colspan="2"><hr /></td>
				</tr>
				<tr>
				    <td colspan="2">
<%switch (updateStep) {%>
<%case 0:%>
				        <div id="divSetupStep0">
				           Please manually set <b>UpdateComplete</b> key to <b>0</b> in <b>App_Data\FileVista.config</b> to be able run the Update Wizard.
                        </div>
<%break;%>
<%case 1:%>
                        This wizard will guide you through the steps required to update this FileVista instance to a newer version.<br /><br />
                        <span style="font-weight: bold;">Please choose the current version that will be updated:</span>
                        <table border="0" cellpadding="0" cellspacing="10" class="generalText">
                            <tr>
                                <td style="width: 200px">From version:</td>
                                <td>
                                    <asp:DropDownList ID="DropDownListVersion" runat="server">
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td style="width: 200px">To version:</td>
                                <td><asp:Label ID="LabelNewVersion" runat="server" Font-Bold="true"></asp:Label></td>
                            </tr>
                        </table>                        
<%break;%>
<%case 2:%>
                        <asp:Label ID="Label2" runat="server" Text="License Key for version 3.x:" Font-Bold="true"></asp:Label>
                        <asp:TextBox ID="TextBox1" runat="server" style="width: 350px; height: 50px;"  TextMode="MultiLine"></asp:TextBox><br /><br />
<%break;%>
<%case 4:%>
                        <div id="divSetupStep4">
                        You can now run the new version of FileVista. Please restart your browser and reload 
                        FileVista as you may experience problems due to old files that may still be in the cache of your browser.
                        If you still have problems, please refresh your browser with Ctrl + F5.
                        <br /><br />
                        </div>
<%break;%>
<%}%>
				    </td>
				</tr>
				<tr>
				    <td colspan="2"><hr /></td>
				</tr>
			
				<tr>
					<td colspan="2" align="right">
    					<asp:Button ID="ButtonNext" runat="server" style="width: 80px" text="Next >" OnClick="ButtonNext_Click" />
                        <asp:Button ID="ButtonFinish" runat="server"  text="Close" OnClientClick="window.close(); return false" />
					</td>
				</tr>
			</table>
        </form>
    </body>
</html>
